/**
 * @author: mattwang@tencent.com
 * @date: 2012-9-25
 */

#ifndef __PARAM_DEF_H__
#define __PARAM_DEF_H__

#include <string>

typedef struct __GlobalParam {
	int debug_level;
	int max_iters;
	double learning_rate;
	int class_num;
//	int leaf_node;
//	int min_node;
	int max_depth;
	double sample_rate;
	double split_rate;
	int min_split_num;
//	__GlobalParam() :
//			debug_level(0), max_iters(400), learning_rate(0.01), class_num(2), leaf_node(20), min_node(50), max_depth(
//					9), sample_rate(0.7), split_rate(0.1) {
//	}
	__GlobalParam() :
			debug_level(0), max_iters(400), learning_rate(0.01), class_num(2), max_depth(9), sample_rate(0.7), split_rate(
					0.1), min_split_num(10) {
	}
} GlobalParam;

extern GlobalParam global_param;

typedef struct __LDAParam {
	int num_topics;
	double alpha;
	double beta;
	std::string training_data_file;
	std::string model_file;
	std::string inference_data_file;
	std::string inference_result_file;
	int burn_in_iterations;
	int total_iterations;
	std::string compute_likelihood;
} LDAParam;

extern LDAParam lda_param;

typedef struct __LRParam {
	int num_topics;
	double alpha;
	double beta;
	std::string training_data_file;
	std::string model_file;
	std::string inference_data_file;
	std::string inference_result_file;
	int burn_in_iterations;
	int total_iterations;
	std::string compute_likelihood;
} LRParam;

extern LRParam lr_param;

typedef struct __SvdParam {
	int task;
	int seed;
	int continue_training;
	int max_round;
	int start_counter;
	int num_round;
	int train_repeat;
	int silent;
	std::string model_in;
	std::string model_out_folder;
	std::string job;
	double print_ratio;
	int input_type;
	int feature_user;
	int name_feat_item;

	int function_type;
	int regularization_type;
	int sync_count;

	double learning_rate;

	double wd_user_bias;
	double wd_item_bias;
	double wd_ufeedback;
	double wd_ufeedback_bias;
	double scale_lr_ufeedback;
	__SvdParam() {
		learning_rate = 0.01f;
		print_ratio = 0.05f;
		train_repeat = 1;
		num_round = 10;
		task = silent = start_counter = 0;
		max_round = INT_MAX;
		continue_training = 0;
		function_type = 0;
		feature_user = 0;
		name_feat_item = 0;
		wd_ufeedback = wd_ufeedback_bias = 0;
		wd_user_bias = wd_item_bias = 0;
		scale_lr_ufeedback = 1.0;

	}
} SvdParam;

extern SvdParam svd_param;

#endif
